package com.orderSystem;

import com.sun.net.httpserver.HttpServer;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.orderSystem.Handler.*;

import java.net.InetSocketAddress;
import java.util.Date;


public class Http
{
	public static void HttpStart() throws Exception{
		HttpServer server = HttpServer.create(new InetSocketAddress(8008),0);
		server.createContext("/test", new Handler.TestHandler());
		server.createContext("/post/register",new RegisterHandler());
		server.createContext("/get/dispensing",new HandlerJri.getDispensingHandler());
		server.createContext("/get/progress",new HandlerJri.getprogress());
		server.createContext("/post/dispensing", new HandlerJri.dispensing());
		server.createContext("/post/confirmMedi", new HandlerJri.confirmMedi());
		server.createContext("/post/Doctorlogin",new Handler.DoctorLoginHandler());
		server.createContext("/post/Patientlogin",new Handler.PatientLoginHandler());
		server.createContext("/post/proOder",new Handler.ProOrderHandler());
		server.createContext("/post/depOder",new Handler.DepOrderHandler());
		server.createContext("/post/proLive",new Handler.ProLiveHandler());
		server.createContext("/post/depLive",new Handler.DepLiveHandler());
        server.createContext("/post/orderProTriage",new Handler.ProOrderHandler());
		server.createContext("/post/orderDepTriage",new Handler.DepOrderHandler());
		server.createContext("/post/liveDepTriage",new Handler.DepLiveHandler());
		server.createContext("/post/liveProTriage",new Handler.ProLiveHandler());
		server.createContext("/get/orderInfo",new GetOrderImformationHandler());
		server.createContext("/get/queueInfo",new GetQueueImformationHandler());
		server.createContext("/get/queueStat",new CallNumerHandler());
		server.start();
		// TODO Auto-generated method stub
	}
	public static void main(String arg[]) throws Exception{
		HttpStart();
	}

}
